package com.guit.hrms.service;

import com.guit.hrms.dto.interview.ApplyOfferDTO;
import com.guit.hrms.dto.interview.AssignedInterviewDTO;
import com.guit.hrms.dto.interview.UpdateInterviewStatusDTO;
import com.guit.hrms.po.interview.Interviewee;
import com.guit.hrms.po.utilsPO.PageBean;

import java.time.LocalDateTime;
import java.util.List;

public interface IntervieweeService {
    Interviewee findResumeById(Integer id);

    Integer uploadResume(Interviewee interviewee);

    PageBean getInterviewee(Integer page, Integer pageSize, Integer planId, String deptId, String positionNumber);

    Integer assignedInterviewForInterviewee(AssignedInterviewDTO assignedInterviewDTO);

    Integer updateInterviewStatus(UpdateInterviewStatusDTO updateInterviewStatusDTO);

    Integer deleteInterviewee(List<Integer> intervieweeIds);

    Integer applyOfferForInterviewee(ApplyOfferDTO applyOfferDTO);

    Integer cancelIntervieweesInterview(AssignedInterviewDTO assignedInterviewDTO);

    /**
     *上传offer接受结果
     * @param offerToken
     * @param result
     */
    Integer uploadOfferAcceptResult(String offerToken, Integer result);

    /**
     * 获取Offer结果
     * @param page
     * @param pageSize
     * @param startTime
     * @param endTime
     * @param result
     * @return
     */
    PageBean getOfferResult(Integer page, Integer pageSize, LocalDateTime startTime, LocalDateTime endTime, Integer result);

    void checkExpiredOffersBatch();

    PageBean findAllActiveOffers(int page, int pageSize);

    void checkOfferExpiry(Integer id);
}
